<?php 
$num_log = 31;
$c=0;
?>

<h1><?=$this->translate->_('header_mod_log')?></h1>

<form method="post" action="">
	<p class="right">
		<?=$this->translate->_('log_choose')?>
		<select name="log" onchange="this.form.submit();">
			<option value="#"><?=$this->translate->_('form_choose')?></option>
			<?foreach(scandir($this->logDir) AS $files):?>
				<?if($files != '..' && $files != '.'):?>
					<option value="<?=$files?>"><?=str_replace('log_', '', $files)?></option>
				<?endif;?>
			<?endforeach;?>
		</select>
	</p>
</form>

<?if($this->logSum > 0):?>
	<table summary="log" class="table_logs">
	<tr>
		<th><?=$this->translate->_('log_lvl')?></th>
		<th><?=$this->translate->_('log_date')?></th>
		<th><?=$this->translate->_('log_desc')?></th>
	</tr>
	<?foreach($this->logCon AS $content):?>
		<tr>
			<td style="font-size:0.8em;" class="log_<?=$content['level']?>"><?=$content['level']?></td>
			<td style="font-size:0.8em;" class="log_<?=$content['level']?>"><?=$this->datetime($content['timestamp'])?></td>
			<td style="font-size:0.8em;" class="log_<?=$content['level']?>"><?=$content['desc']?></td>
		</tr>
	<?endforeach;?>
	</table>
<?else:?>
	<p class="notice_bad"><?=$this->translate->_('log_error')?></p>
<?endif;?>